package com.j.lemon.learn.jvm;

/**
 * @Author lijunjun
 * @Date 2020-02-12 17:16
 * @Description
 */
public class OverloadDemo {
    static class A extends OverloadDemo{

    }

    static class B extends OverloadDemo{

    }

    void sayHello(OverloadDemo overloadDemo){
        System.out.println("overloadDemo");
    }

    void sayHello(A a){
        System.out.println("a");
    }

    void sayHello(B b){

    }

    public static void main(String[] args) {
        OverloadDemo overloadDemo = new OverloadDemo();
        OverloadDemo a = new A();
        OverloadDemo b = new B();
        overloadDemo.sayHello(a);
        overloadDemo.sayHello(b);
    }
}
